﻿<Window x:Class="ICSharpCode.WpfDesign.Designer.Services.ChooseClassDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Services="clr-namespace:ICSharpCode.WpfDesign.Designer.Services"
        Background="{x:Static SystemColors.ControlBrush}"
        SnapsToDevicePixels="True"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanResizeWithGrip"
        Title="Choose Class"
        Height="438"
        Width="488">

    <Grid>
        <TextBlock Text="Starts with:"
                   HorizontalAlignment="Left"
                   Margin="12,12,0,0"
                   VerticalAlignment="Top"
                   Height="13"
                   Width="55" />
        <TextBox x:Name="uxFilter"
                 Text="{Binding Filter, UpdateSourceTrigger=PropertyChanged}"
                 Height="23"
                 Margin="12,31,12,0"
                 VerticalAlignment="Top" />

        <Services:ClassListBox x:Name="uxList"
                               Margin="12,60,12,78"
                               ItemsSource="{Binding Classes}"
                               IsSynchronizedWithCurrentItem="True"
                               ScrollViewer.HorizontalScrollBarVisibility="Hidden">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="../Images/Class.png"
                               Width="16"
                               Height="16"
                               />
                        <TextBlock Margin="5 0 0 0"
                                   Text="{Binding Converter={x:Static Services:ClassNameConverter.Instance}}"
                                   VerticalAlignment="Center" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </Services:ClassListBox>

        <CheckBox Content="Show System Classes"
                  IsChecked="{Binding ShowSystemClasses}"
                  Height="16"
                  HorizontalAlignment="Left"
                  Margin="12,0,0,56"
                  VerticalAlignment="Bottom"
                  Width="120" />
        <Button x:Name="uxOk"
                Content="OK"
                Height="23"
                Margin="0,0,93,12"
                VerticalAlignment="Bottom"
                HorizontalAlignment="Right"
                Width="75"
                IsDefault="True"
                IsEnabled="{Binding SelectedItem, ElementName=uxList, Converter={x:Static Services:NullToBoolConverter.Instance}}" />
        <Button Content="Cancel"
                Height="23"
                HorizontalAlignment="Right"
                Margin="0,0,12,12"
                VerticalAlignment="Bottom"
                Width="75"
                IsCancel="True" />
    </Grid>
</Window>
